package codename.carrot.bomberman.game.listener;

import codename.carrot.bomberman.AppStorage.Direction;

/**
 *  Interface for classes that listens to changes to a player
 * @author Group A4
 *
 */
public interface PlayerListener {
    /**
     *  Notification for when a (remote) player started moving
     * @param playerId the ID of the player that started moving
     * @param xCoorMapFrom the x-coordinate on the map (grid) for original start of movement
     * @param yCoorMapFrom the y-coordinate on the map (grid) for original start of the movement
     * @param direction the direction in which to move to
     */
    public void onPlayerMoved(int playerId, int xCoorMapFrom, int yCoorMapFrom, Direction direction);
    
    /**
     *  Notification for when a (remote) player stopped moving
     * @param playerId the ID of the player that stopped moving
     * @param xCoorMap the x-coordinate on the map (grid) for the final position of movement
     * @param yCoorMap the y-coordinate on the map (grid) for the final position of the movement
     */
    public void onPlayerStopsMoving(int playerId, int xCoorMap, int yCoorMap);
    
    /**
     *  Notification for when a player has picked up an item
     * @param playerId the ID of the player that picked up an item
     * @param xCoorMap the x-coordinate on the map (grid) of the item
     * @param yCoorMap the y-coordinate on the map (grid) of the item
     */
    public void onPlayerItemPickup(int playerId, int xCoorMap, int yCoorMap);
    
    /**
     *  Notification for when a player has lost a life, and who took the life
     * @param playerVictimId the player ID of the victim
     * @param playerKillerId the player ID of the killer
     * @param livesLeft number of lives left the victim has
     */
    public void onPlayerLostLife(int playerVictimId, int playerKillerId, int livesLeft);
    
    /**
     * Notification for when a player has quit the game
     * @param playerId the ID of the player that quit the game
     */
    public void onPlayerQuit(int playerId);
}
